Repository navigation
refactor: split every file over 1,000 lines into topic files - #1582
Merged
Merged
Conversation
Moves the pure constants to spec-lint-patterns.mjs and the pure text and reference helpers to spec-lint-text.mjs. The feature checks read the run's parsed body and issue state, so they stay in the root; the CLI output and exit codes are unchanged.
Pure structure split: types, defaults, role checks, validators and generic helpers move to sibling files; config.ts keeps the entry point and every previous export.
Protocol-bump: none (refactor: operations.ts split into files, no wire shape changes)
…h helpers out of index.ts
…was in the coordinator
…tcher handlers, client and config checks
… split carries over unchanged
…s, boot, DeviceHub, slim, catalog, components and seeds parts
…g provision to its seeds part
…ient class stays private behind a factory
The config, contract and client files were split into parts that the same entry files re-export; no key, default, operation, wire shape or client method changed. Docs: none (structure-only split; every public name and behaviour is unchanged)
|
Important Review skippedToo many files! This PR contains 421 files, which is 271 over the limit of 150. To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files.
|
Contributor
Author
Review ledgerRound 1: dc10f6e {"findings":[{"id":"R1","role":"claims","class":"stale pre-split pointers","outcome":"fixed","path":"multiple","round":"1","fix":"abc46bfded7d46b3cc5ee5a11108c98489588287"},{"id":"R2","role":"code","class":"docs-surface config surface watched only config.ts","outcome":"fixed","path":".agents/scripts/docs-surface-check.mjs","round":"1","fix":"73fc87c1fae0c05ec1272c152d35837d6a6bcabd"},{"id":"R3","role":"code","class":"docs-surface config surface omitted config-alerts.ts","outcome":"fixed","path":".agents/scripts/docs-surface-check.mjs","round":"2","fix":"f5305a5ab62586a7ffbf0d5fdf2186dd652f8f97"}]}Written by an agent. |
Comment on lines
+112
to
+121
| const child = spawnChildProcess(launch.command, launch.args, { | ||
| ...(options.cwd === undefined ? {} : { cwd: options.cwd }), | ||
| ...(options.env === undefined ? {} : { env: options.env }), | ||
| detached: process.platform !== "win32", | ||
| stdio: childStdio(options.stdio, logFd), | ||
| // why: the daemon has no console, so on Windows a console program it starts (adb, the | ||
| // emulator, node) would otherwise get a new, visible one. | ||
| windowsHide: true, | ||
| windowsVerbatimArguments: launch.windowsVerbatimArguments, | ||
| }); |
Comment on lines
+156
to
+164
| const child = spawnChildProcess(launch.command, launch.args, { | ||
| ...(options.cwd === undefined ? {} : { cwd: options.cwd }), | ||
| ...(options.env === undefined ? {} : { env: options.env }), | ||
| detached: process.platform !== "win32", | ||
| stdio: "pipe", | ||
| // why: as in `spawn`: no visible console window for a child of a daemon that has none. | ||
| windowsHide: true, | ||
| windowsVerbatimArguments: launch.windowsVerbatimArguments, | ||
| }); |
…essions for members only tests reach through a harness
… manuals' size budget
…split into The gate watched only src/core/config.ts, so after the split a change to the config type, defaults or validators passed with no website page changed.
…ments say why Comments and flow docs still named pre-split locations. An edited comment must follow architecture rule 17, so those blocks now say why without pointing elsewhere, or are gone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splits every tracked code and test file over 1,000 lines into files that group related code, each named for what it holds. No behaviour changes: every module's entry file exports the same names. After this PR no file is over 1,000 lines, and
SHRINK_ONLYinsource-hygiene.test.tsis empty.The five big classes (iOS driver, lease-acquisition coordinator, fleet coordinator, daemon dispatcher, daemon server) follow ADR 0063: one composition root over parts that own their state, with no import cycles. The other code files were moved into topic files that their entry file re-exports. The 52 test files were split by
describe, with shared setup intest-*.tshelpers.Tooling changed so that a split code move passes the hooks:
testing-only-in-tests: atesting.tsentry may importtest-*.tshelpers.Not done here: refactor issues, pin tests and the mutation run (delivery rule 18). The maintainer chose to land this without them.
Review
Spec review: skipped. Code review: 0 blocking, 2 fixed, 2 notes. Claims review: 0 blocking, 1 fixed, 1 notes.
Assessment: complete — round 1 at dc10f6e (code and claims lenses), a fix-check at abc46bf that ran no lens, and a targeted round 2 at f5305a5 (code and claims lenses), which found nothing.
Rejected: claims:
device-selection.md:13andconsole-redesign/PLAN.md:200nameoperations.tslocations that were already wrong at the merge base (out of scope); thedocs-surface-check.mjsheader wording "the parts it re-exports" is loose, not false (nonblocking).Rounds: 3. Tokens: 15M.
Fixed: R1 stale pre-split pointers in comments and docs (edited comments rewritten to architecture rule 17); R2 the docs-surface gate watched only
config.tsafter the split; R3 it also missedconfig-alerts.ts, which pre-dates this PR.Notes (from the orchestrator's own checks before the blind review):
src/clitests pass only after earlier tests in their file have warmed module state, so their grouping is fragile.skip,toBeInstanceOf(Error)or internal import through unchanged; a new one is still flagged.why:comments insrc/cli/index-environment-helpers.test.tsandindex-lease-requests.test.tscall the CLI environment builder "a part of a decomposed module"; check that wording.Written by an agent.